package j02block;

class Fa{
    static {
        System.out.println("Fa static");
    }
    {
        System.out.println("Fa 初始化代码块");
    }

    public Fa() {
        System.out.println("Fa 构造");
    }
}
class Ch extends Fa{
    static {
        System.out.println("Ch static");
    }
    {
        System.out.println("Ch 初始化代码块");
    }

    public Ch() {
        System.out.println("Ch 构造");
    }

    static int age = 4;
}

public class J2 {
    public static void main(String[] args) {
        //不new
        /*
        Fa static
        Ch static
         */
//        System.out.println("Ch.age = " + Ch.age);

        //new
        /*
        Fa static
Ch static
Fa 初始化代码块
Fa 构造
Ch 初始化代码块
Ch 构造
         */
        System.out.println(new Ch());
    }
}
